//
//  ViewController.swift
//  SwiftDemo
//
//  Created by ZhangBo on 2017/5/7.
//  Copyright © 2017年 ZhangBo. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        let  button : UIButton = UIButton()
        button.addTarget(self, action:#selector(ViewController.clickMe), for: UIControlEvents.touchUpInside)
        button.backgroundColor = UIColor.yellow
        button.frame = CGRect.init(x: 10, y: 10, width: 50, height: 30)
        button.center = self.view.center
        self.view.addSubview(button)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    

    func clickMe() {
        print("hello world")
    }
    
    

}

